Kill gpg agent in package-test.el to avoid a race
authorRob Browning <rlb@defaultvalue.org>
Mon, 10 Oct 2016 22:35:56 +0000 (17:35 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 1 Jul 2017 19:32:23 +0000 (14:32 -0500)
commit3456bf7e394316db2cde7522f233cf5b2d5dda83
tree5f07f8bc719f2a560beadf8553d92eb57a7a1850
parentbc4a4c2ece7a047e0de8191514bdeac7d3c3a0a6
Kill gpg agent in package-test.el to avoid a race

package-test.el should no longer fail during clean up.

* Previously a delete-directories call raced with the gpg agent's own
  cleanup process (presumably triggered by the first deletion of one of
  the agent's sockets).  As a result, it looks like the agent might
  delete one of its sockets after delete-directories had decided to
  delete the socket, but before it made the attempt, causing an
  exception.

* To fix the problem, explicitly ask gpg-connect-agent to kill the agent
  before attempting to delete the gnupg home directory, and then delete
  via "rm -rf" to ignore any vanishing files.
test/automated/package-test.el